<template>
	<view class="box">
		<uNavbar title="资金明细" bgColor="#EDEAE4"></uNavbar>

		<view class="main">
			<view class="main_item" v-for="item in zlist" :key="item.id">
				<view class="main_item_top">
					<view class="main_item_from">
						<text>{{item.from_desc}}</text>
						<!-- <text class="c6 f24" v-if="item.from == 3">({{item.remark}})</text> -->
					</view>
					<view class="main_item_price">
						{{item.amount}}
					</view>
				</view>
				<view class="main_item_bottom">
					<view class="main_item_text overflow1">
						{{item.remark}}
					</view>
					<view class="main_item_time">
						{{item.create_time}}
					</view>
				</view>
			</view>
		</view>
			<noDatas :xxxList="zlist" :status="status"></noDatas>
		<u-popup :show="shuoming" :round="10" mode="center" bgColor="transparent" @close="shuoming=false" :closeable="true">
			<view class="shuo_content">
			<!-- 	<view class="shuo_tit">
					说明
				</view> -->
				<view class="shuo_txt">
					<rich-text :nodes="info.integral_explain"></rich-text> 
				</view>
			</view>
		</u-popup>
	</view>

</template>

<script>
	import {threeBillLog} from "../../api/wallet.js"
	export default {
		data() {
			return {
				page: 1,
				size: 10,
				status: 'loadmore', //加载前值为loadmore，加载中为loading，没有数据为nomore
				zlist: [],
				info:{},
				walletType:1,
				shuoming:false,
			}
		},
		onShow() {
			this.getlist()
		},
		methods: {
			getlist() {
				threeBillLog({
					page: this.page,
					wallet_type:this.walletType
				}).then(res => {
					if (res.code == 1) {
						let list = res.data.data;
						this.zlist = this.page == 1 ? list : this.zlist.concat(list);
						console.log(this.zlist);
						if (list.length < this.size) this.status = 'nomore';
						else this.status = 'loading';
					}
				})
			}
		},
		onReachBottom() {
			if (this.status != 'nomore') {
				this.page = this.page + 1
				this.getlist()
			}
		},
	}
</script>

<style lang="scss" scoped>
	.box {
		width: 750rpx;
		height: 100vh;
		background: #EDEAE4;
		// background-image: url("../../static/image/wallet_bg.png");
		background-size: 750rpx 418rpx;
		background-repeat: no-repeat;
	}
	.wh {
		width: 25rpx;
		height: 25rpx;
		margin-left: 10rpx;
	}
	.shuo_content{
		width: 670rpx;
		margin: 0 auto;
		min-height: 400rpx;
		background-color:#F5ECDF;
		border-radius: 20rpx;
		padding-bottom: 40rpx;
		padding-top: 40rpx;
		.shuo_tit{
			font-weight: 500;
			font-size: 36rpx;
			color: #333;
			text-align: center;
			margin-top: 40rpx;
		}
		.shuo_txt{
			width: 500rpx;
			margin: 0 auto;
			margin-top: 20rpx;
			color: #666;
			font-size: 28rpx;
			line-height: 50rpx;
		}
	}
	.main {
		width: 690rpx;
		margin-top: 40rpx;
		// border-radius: 20rpx;
		margin: 0 auto;
		margin-top: 32rpx;
		background: #FFFFFF;
		// padding-bottom: 60rpx;
		// border-radius: 20rpx;
		.titt{
			width: 690rpx;
			text-align: center;
			font-weight: 400;
			font-size: 36rpx;
			color: #333;
			padding-top: 38rpx;
			margin-bottom: 30rpx;
		}
		.main_item {
			width: 690rpx;
			height: 150rpx;
			background: #FFFFFF;
			// border-radius: 16rpx 16rpx 16rpx 16rpx;
			margin: 0 auto;
			// margin-bottom: 30rpx;
			.main_item_top {
				display: flex;
				justify-content: space-between;

				.main_item_from {
					font-size: 28rpx;
					color: #333;
					margin: 24rpx;
				}

				.main_item_price {
					font-weight: 500;
					font-size: 36rpx;
					color: #A68A64;
					margin: 24rpx;
				}
			}
			.main_item_bottom{
				display: flex;
				justify-content: space-between;
				.main_item_text{
					width: 400rpx;
					font-size: 24rpx;
					color: #A6A5AF;
					margin-left: 24rpx;
				}
				.main_item_time{
					font-weight: 400;
					font-size: 24rpx;
					color: #A6A5AF;
					margin-right: 24rpx;
				}
			}
		}
	}
	.wrap{
		width: 690rpx;
		margin: 0 auto;
		min-height: 200rpx;
		background: linear-gradient( 180deg, #F2E3CE 0%, rgba(254,254,253,0.27) 47%, #FFFFFF 100%);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		padding-bottom: 40rpx;
		.wrap_top{
			width: 690rpx;
			min-height: 152rpx;
			// background-image: url("../../static/image/ddd.png");
			background-size: 690rpx 352rpx;
			.tit{
				font-weight: 400;
				font-size: 36rpx;
				color: #666;
				padding-top: 32rpx;
				margin-left: 32rpx;
			}
			.num{
				margin-top: 22rpx;
				margin-left: 32rpx;
				font-weight: 700;
				font-size: 52rpx;
				color: #333;
			}
			.line{
				width: 620rpx;
				height: 0rpx;
				margin: 0 auto;
				margin-top: 30rpx;
				border-bottom: 2rpx solid rgba(255,255,255,0.1);
			}
			.txt{
				width: 642rpx;
				min-height: 118rpx;
				margin: 0 auto;
				font-weight: 400;
				margin-top: 22rpx;
				font-size: 26rpx;
				color: #999;
			}
		}
		.btn_wrap{
			width: 690rpx;
			margin-top: 40rpx;
			display: flex;
			justify-content: space-around;
			align-items: center;
			.btn1{
				width: 150rpx;
				height: 64rpx;
				background: linear-gradient( 90deg, #AB8E68 0%, #D7BA93 100%);
				box-shadow: 0rpx 8rpx 12rpx 2rpx rgba(59,8,71,0.3);
				border-radius: 536rpx 536rpx 536rpx 536rpx;
				text-align: center;
				line-height: 64rpx;
				font-weight: 500;
				font-size: 28rpx;
				color: #FFFFFF;
			}
			.btn2{
				width: 150rpx;
				height: 64rpx;
				background: linear-gradient( 90deg, #AB8E68 0%, #D7BA93 100%);
				box-shadow: 0rpx 8rpx 12rpx 2rpx rgba(59,8,71,0.3);
				border-radius: 536rpx 536rpx 536rpx 536rpx;
				text-align: center;
				line-height: 64rpx;
				font-weight: 500;
				font-size: 28rpx;
				color:#FFFFFF;
			}
		}
	}
</style>